import request from '@/utils/request'
// 获取数据列表api
export function getDepartmentsListAPI() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

export function delDepartmentsListAPI(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

// 新增部门
export function reqAddDepartmentsAPI(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 获取部门详情数据
export function reqGetDepartDetailAPI(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑部门
export function reqUpdateDepartmentsAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
